﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace TransportAbstractionLibrary.Exceptions
{
    [Serializable, ComVisible(true)]
    public class TALException : ApplicationException
    {
        IProtocolBase protocol;
        IProtocolBase Protocol
        {
            get
            {
                return protocol;
            }
        }

        public TALException(IProtocolBase protocol)
            : base()
        {
            this.protocol = protocol;
        }

        public TALException(IProtocolBase protocol, string message)
            : base(message)
        {
            this.protocol = protocol;
        }

        public TALException(IProtocolBase protocol, string message, Exception innerException)
            : base(message, innerException)
        {
            this.protocol = protocol;
        }

        public TALException(IProtocolBase protocol, Exception innerException)
            : base(innerException.Message, innerException)
        {
            this.protocol = protocol;
        }
    }
}
